home *** CD-ROM | disk | FTP | other *** search
- Path: hades.rz.uni-sb.de!news
- From: rajsta@med-rz.uni-sb.de (Johannes Stahl)
- Newsgroups: comp.graphics.algorithms,comp.lang.c++,comp.os.ms-windows.programmer.graphics,comp.os.ms-windows.programmer.multimedia,comp.os.ms-windows.programmer.win32
- Subject: Re: IJG JPEG Engine and Win32
- Date: Fri, 05 Jan 1996 07:37:37 GMT
- Organization: University of Saarland, Computing Center, Germany.
- Message-ID: <4cij50$35l@hades.rz.uni-sb.de>
- References: <4cemir$6vb@redstone.interpath.net>
- NNTP-Posting-Host: ukdra02.med-ra.uni-sb.de
- X-Newsreader: Forte Free Agent 1.0.82
-
- fortunat@interpath.com (Jumpstile Turner) wrote:
-
- > Hi all. Has anyone successfully compiled and linked the IJG JPEG engine
- >with a Win32 compiler? I can compile it fine and the resulting LIB file works
- >great when linking it into the included test applications; however, if I try
- >to link it with my GUI apps I get some really odd errors. It links fine but
- >doesn't work! I'm using Borland C++ 4.52 (maybe this is my problem. (-: )
- >Basically stepping through with the debugger there is an assignment statement
- >in one of the modules that just doesn't do anything. I mean nothing. If I do
- >the assignment by hand with the debugger it works. For example, the
- >assignment is as follows:
-
- > cinfo->output_width = cinfo->image_width;
-
- >cinfo->output_width is 0 and cinfo->image_width is say 289. After the above
- >assignment nothing changes. I'm far from a c++ expert and I've never
- >encountered something like this before. If someone has compiled this lib
- >under Win32 I'd appreciate it if they could mail it my way. I'd like to see
- >if its my compiler settings or just my ignorance. ;) The big problem I can't
- >figure is that the compiled lib works fine linked with the test programs. I
- >tried copying the code from the examples line for line but it just won't work
- >under the GUI.
-
- I had the same problem. It turned out that the data alignment settings
- were different for the library and the application, which means that
- the application and the library expect the data items in a struct to
- be at different adresses. This is why your debugger doesn't see any
- change in the variables. You should also take care for redefinitions
- of boolean, which is declared to be a (32 bit) int in the jpeg
- headers, but to be a (8 bit) character in Microsofts rpc.h.
-
-
- --
- Dr. Johannes Stahl Abt. Radiodiagnostik
- Radiologische Klinik, D66421 Homburg/Saar (GERMANY)
- Tel.: +49 6841 164600 Fax: +49 6841 164696
- e-mail: rajsta@med-rz.uni-sb.de
- http://www.med-rz.uni-sb.de/med_fak/radiodiagnostik/index.html
-
-